<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.sailorj.medical.domain.family.Family" %>
<%@ include file="/common/base.jsp"%>
<% 
  //实例化AreaDao
  FamilyDao familyDao=new FamilyDao();
  int[]grades={1,2,3};
  List<Family> familyList=familyDao.findFamilyList();

%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<link rel="stylesheet" type="text/css" href="css/styles.css">
<link rel="stylesheet" type="text/css" href="css/admin.css">

<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="js/admin.js"></script>
<script type="text/javascript" src="js/chdj.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		//重新绑定表单提交
		$("#add_btn").bind("click", function() {
			$('form').submit();
		});
	});
</script>

<%
		String userid = session.getAttribute("userid").toString();
		System.out.println("在joinNhAdd JSP的userid=="+userid);
	%>
	
</head>

<body>

	<div class="panel admin-panel">
		<div class="panel-head" id="add">
			<strong><span class="icon-pencil-square-o"></span>增加家庭档案信息</strong>
		</div>
		<div class="body-content">
			<form id="form-add" method="post" class="form-x"
				action="<%=path%>/biz/Family_memberServlet?m=find">
				<div class="form-group">
					<div class="label">
						<label>所属家庭：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="familycode" id="familycode" list="family" onblur="NumCheckInfo()"/>
						<datalist id="family" class="selectDate" aria-invalid="false"> 
							<%
						  for(Family m:familyList){ 
						
						  %>
							<option value="<%=m.getFamilycode()%>"><%=m.getFamilyname() %></option>
							<%} %>

						</datalist >


						<div class="tips" id="tips"></div>
					
					</div>
				</div>
				
				
				<div class="form-group">
					<div class="label">
						<label>缴费金额：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="money" id="money"
							onblur="NumCheckInfo()"/>
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>户主：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="familyname"
							data-validate="required:请输入户主名称" />
						<div class="tips"></div>
					</div>
				</div>

				<div class="form-group">
					<div class="label">
						<label>身份证号：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="IDcard"
							data-validate="required:请输入身份证号" />
						<div class="tips"></div>
					</div>
				</div>

				<div class="form-group">
					<div class="label">
						<label>地址：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="familyaddr"
							data-validate="required:请输入具体地址" />
						<div class="tips"></div>
					</div>
				</div>

				<div class="form-group">
					<div class="label">
						<label>家庭人口数：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="familynumber"
							data-validate="required:请输入家庭人口数" />
						<div class="tips"></div>
					</div>
				</div>

				<div class="form-group">
					<div class="label">
						<label>组编号：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="familyteam"
							data-validate="required:请输入组编号" />
						<div class="tips"></div>
					</div>
				</div>

				<div class="form-group">
					<div class="label">
						<label>户属性：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="familystate"
							data-validate="required:请输入户属性" />
						<div class="tips"></div>
					</div>
				</div>

				<div class="form-group">
					<div class="label">
						<label>登记员：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="<%=userid %>" name="userid"
							data-validate="required:请输入登记员" readonly="readonly"/>
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label></label>
					</div>
					<div class="field">
						<button id="add_btn" class="button bg-main icon-check-square-o" type="button">提交</button>
						<button class="button bg-red icon-share-square-o" type="button" onclick="window.history.go(-1)">返回</button>
					</div>
				</div>
			</form>
		</div>
	</div>

</body>
</html>
